package windbell.domain.risk.impl;

import edu.fudan.mylang.pf.BaseModelObject;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Table;
import org.hibernate.annotations.DiscriminatorOptions;
import windbell.domain.risk.RiskCheckTarget;
import windbell.domain.risk.proxy.RiskCheckTargetProxy;

@Entity
@DiscriminatorValue("RISKCHECKTARGET_TYPE")
@DiscriminatorOptions(force = true)
@DiscriminatorColumn(length = 64)
@Table(name = "riskchecktarget")
public abstract class RiskCheckTargetImpl extends BaseModelObject implements RiskCheckTarget {
  public RiskCheckTargetImpl() {
    super();
  }
  
  public RiskCheckTargetProxy toProxy() {
    windbell.domain.risk.proxy.RiskCheckTargetProxy proxy = new windbell.domain.risk.proxy.RiskCheckTargetProxy();
    proxy.setId(this.getId());
    if(this instanceof edu.fudan.mylang.pf.INamedModelObject){
    	proxy.setName(((edu.fudan.mylang.pf.INamedModelObject)this).getEntityName());
    }
    return proxy;
    
  }
}
